<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>VUE Template</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <p v-if="seen">you see me!</p>
        <h1>Hi,{{name}}</h1>
        <a v-bind:href='url'>...</a>
        <a v-on:click="click1">....</a>
        <div @click="click1">
            <div @click.stop="click2">
                click me
            </div>
        </div>
    </div>
</body>
    <script type="text/javascript">
        
        const vm = new Vue({
            el:'#root',
            data:function(){
                return{
                    name:'trentwu',
                    seen:false,
                    url:'https://www.baidu.com',
                    doSomething:'click1'
                }
            },
            methods:{
              click1(event){
                  console.log('click1');
              },
              click2(){
                console.log('click2');
              }
          }
        })
    </script>
</html>